package com.hzw.saas.service.project.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hzw.saas.service.project.bo.ProjectApplyInfoBO;
import com.hzw.saas.service.project.bo.ProjectApplyScrollBo;
import com.hzw.saas.service.project.model.ProjectApply;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author sonam
 * @since 2021-08-04
 */
@Mapper
public interface ProjectApplyMapper extends BaseMapper<ProjectApply> {

    /**
     * 分页获取项目申请管理列表
     * @param page
     * @param flowId
     * @param fuzzy
     * @param type
     * @param statusIds
     * @param notifyState
     * @param levelIds
     * @param sort
     * @return
     */
    IPage<ProjectApplyInfoBO> pageProjectApply(Page page, @Param("flowId") String flowId,
                                               @Param("fuzzy") String fuzzy ,
                                               @Param("type") Integer type,
                                               @Param("statusIds") List<String> statusIds,
                                               @Param("notifyState") Integer notifyState,
                                               @Param("levelIds") List<String> levelIds,
                                               @Param("sort") Integer sort);

    /**
     * 获取一定数量的 项目审批通过公告
     *
     * @param count the count
     * @return the list
     */
    List<ProjectApplyScrollBo> limitProjectScroll(@Param("count") Integer count);

}
